package com.sixth.stock.controller;

import com.sixth.core.vo.R;
import com.sixth.stock.entity.Dept;
import com.sixth.stock.mapper.DeptMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/stock/dept")
public class DeptController {
    @Resource
    DeptMapper deptMapper;
    //前台查询科室列表
    @RequestMapping("/list1")
    public R<List<Dept>> list1(){
        return R.ok(deptMapper.list1());
    }
    //后台查询科室列表,与前台查询作比较，看看时间
    @RequestMapping("/list2")
    public R<List<Dept>> list2(){
        return R.ok(deptMapper.list2());
    }

}
